import React, {Component} from 'react'

class App extends Component {
  render() {
    return (
      // JSX 遇到尖括号'<'就按HTML解析，遇到花括号'{'就按JS解析
      <ul className="my-list">
        <li>{false ? 'Hello World' : '你好世界'}</li>
        <li>I Love React</li>
      </ul>
    )

    // 上述JSX相当于：
    /*let child1 = React.createElement('li', null, 'Hello World!')
    let child2 = React.createElement('li', null, 'I Love React!')
    let root = React.createElement('ul', {className: 'my-list'}, child1, child2)
    return root*/
  }
}

export default App